package com.tz.water.utils;

import java.util.HashMap;

public class ResponseUtils {

    public static HashMap<String,Object> success (Object object) {

        HashMap<String ,Object> hashMap = new HashMap<>();
        hashMap.put("code",1);
        hashMap.put("info",object);
        return hashMap;
    }
    public static HashMap<String,Object> successlist (long total,long totalpage, long currentpage,Object data) {

        HashMap<String ,Object> hashMap = new HashMap<>();
        hashMap.put("code",1);
        hashMap.put("info",data);
        hashMap.put("total",total);
        hashMap.put("currentpage",currentpage);
        hashMap.put("totalpage",totalpage);
        return hashMap;
    }
    public static HashMap<String,Object> fail (Object object) {

        HashMap<String ,Object> hashMap = new HashMap<>();
        hashMap.put("code",0);
        hashMap.put("info",object);
        return hashMap;
    }

    public static HashMap<String,Object> notlogin (Object object) {

        HashMap<String ,Object> hashMap = new HashMap<>();
        hashMap.put("code",50008);
        hashMap.put("info",object);
        return hashMap;
    }
}
